ostree/dump: Improve formatting for well-known commit metadata keys
authorPhilip Withnall <withnall@endlessm.com>
Wed, 7 Jun 2017 11:03:57 +0000 (12:03 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 7 Jun 2017 16:55:35 +0000 (16:55 +0000)
commit7ce6777028953457c1f4125c48e6dc99a37949fc
tree9a554e88abd2e62f2bdf94f4908dbfcb76a8ab86
parent87413ee63b1612ee4d870e2e19b2b58643201641
ostree/dump: Improve formatting for well-known commit metadata keys

This follows on from commit a946c3d4, which added formatting for
well-known summary metadata keys. This commit adds it for commits.

Currently, the only well-known commit metadata key is
ostree.commit.timestamp. Formatting this correctly is especially
important, since it’s a big-endian uint64, which is completely unusable
for mere mortals when presented as a number rather than a date.

Non-formatted output can still be retrieved using the OSTREE_DUMP_RAW
flag, and the non-formatted key name is always printed for clarity.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #911
Approved by: cgwalters
src/ostree/ot-dump.c
tests/test-summary-view.sh